from django.conf.urls import url
from rest_framework.routers import DefaultRouter

from goods import views

urlpatterns = [
    url(r'^goods/recommend/$', views.GoodsListView.as_view()),
    url(r'^goods/category/$', views.GoodsCategoryListView.as_view()),
    url(r'^goods/(?P<goods_id>\d+)/$', views.GoodsDetailView.as_view()),
    url(r'^goods/$', views.GoodsListsView.as_view()),
    url(r'^category/(?P<category_id>\d+)/$', views.CategoryListView.as_view()),
    # url(r'^category/(?P<pk>\d+)/$', views.CategoryDetailView.as_view()),

]
#
# router = DefaultRouter()
# router.register(r'goods', views.GoodsViewSet, base_name='goods')
# urlpatterns += router.urls
